<template>
  <div class="card-container">
    <div class="top-border" />
    <div class="padding-wrapper">
      <div class="total-price">
        <div class="price-name">
          票品总价
        </div>
        <div :style="[{color:$store.state.themeColor}]" class="price-num">
          <span class="price-messure">
            ￥
          </span><span class="price-digit">
            {{totalPrice}}
          </span>
        </div>
      </div>
      <div class="invoice" @click="toggleDetail" v-if="!showDetail">
        <div class="invoice-name">
          订单编号 {{billlcode}}
        </div>
        <div class="invoice-type">
          <span class="invoice-chosen">
            订单详情
          </span>
          <div class="arrow" />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "TotalPrice",
  props: ["totalPrice", "billlcode", "showDetail", "toggleDetail"]
};
</script>

<style scoped lang="scss">
.card-container {
  width: 100%;
  padding: 0;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  margin-bottom: 24px;

  .top-border {
    width: 100%;
    height: 3px;
    background: #282b31;
  }

  .padding-wrapper {
    width: 100%;
    padding: 0 25px;
    box-sizing: border-box;

    .total-price,
    .invoice {
      width: 100%;
      box-sizing: border-box;
      padding: 30px 0;
      position: relative;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
    }

    .price-name,
    .invoice-name {
      color: #fff;
      font-size: 28px;
    }

    .price-num {
      font-weight: 500;
      display: flex;
      flex-direction: row;
      align-items: baseline;
      .price-messure {
        font-size: 24px;
      }
      .price-digit {
        font-size: 32px;
      }
    }

    .invoice-type {
      display: flex;
      flex-direction: row;
      align-items: center;

      .invoice-chosen {
        color: #9d9d9d;
        font-size: 24px;
        margin-right: 10px;
      }
    }

    .arrow {
      @include right-arrow();
    }
  }
}
</style>
